package com.qf.service;

import com.qf.bean.Teacher;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;

import java.util.List;

public interface TeacherService {
    //查询所有学生,要求根据出生日期降序排序  sort排序规则
    public List<Teacher> findAll(Sort sort);
    //查询全部数据，并分页展示
    public Page<Teacher> findByTidIn(List list, Pageable pageable);
    //count查询
    public int  countByTnameContaining(String name);
    //区间查询
    public List<Teacher> findbyids(int begin,int end);
    //大于某个范围
    public List<Teacher> findgreater(int tid);
    public List<Teacher> findByTnameStartingWith(String name);
    public List<Teacher> findByTidIn(List<Integer> ids);
    //主键查询
    public Teacher findbyid(int tid);
    //新增
    public Teacher insertTea(Teacher teacher);
    //修改
    public Teacher updateTeacher(Teacher teacher);
    //全部查询
    public List<Teacher> findall();
    //根据老师姓名进行模糊查询
    public List<Teacher> findbyname(String tname);

    public List<Teacher> findbytnameAndsex(String name,String sex);
}
